package com.zhongwang.mms.module.half.controller;

import com.zhongwang.mms.base.BaseController;
import com.zhongwang.mms.gen.entity.User;
import com.zhongwang.mms.util.ShiroUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @description:出入库冲单
 * @author: th
 * @time: 2020/4/8 14:59
 */
@Controller
@RequestMapping("/half/halInvManage/InvRevEntry")
public class InvRevEntryController extends BaseController {

    //页面文件路径
    private String prefix = "half/halInvManage/InvRevEntry";

    // 页面
    @GetMapping("/page")
    @RequiresPermissions({"halinv:halreverse:view"})
    public String create(Model model) {

        // 获取登入用户实体
        User user = ShiroUtils.getUser();
        model.addAttribute("userName", user.getName());
        model.addAttribute("odrDate", new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
        return prefix + "/list";
    }


}
